package com.woniuxy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.pojo.HealthReports;
import com.woniuxy.service.HealthReportsService;
import com.woniuxy.mapper.HealthReportsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author admin
* @description 针对表【health_reports(体检报告整合表)】的数据库操作Service实现
* @createDate 2025-06-11 20:43:39
*/
@Service
public class HealthReportsServiceImpl extends ServiceImpl<HealthReportsMapper, HealthReports>
    implements HealthReportsService{

    @Autowired
    private HealthReportsMapper healthReportsMapper;

    @Override
    public HealthReports getReportByAppointmentId(Integer appointmentId) {
        QueryWrapper<HealthReports> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("appointment_id", appointmentId);
        return healthReportsMapper.selectOne(queryWrapper);
    }
}




